invalidate recorded content identifier tree when export changes
authorJoey Hess <joeyh@joeyh.name>
Tue, 23 Sep 2025 16:52:55 +0000 (12:52 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 23 Sep 2025 16:52:55 +0000 (12:52 -0400)
commitff65cd695472ba8b21eed99d14b94ff6f94ccb64
tree9c0331460c34fcc0ad985a1a35276d0c40ab96f9
parenta1cd61b1c44e30f3d5ceeb1f722f817cb755c1d5
invalidate recorded content identifier tree when export changes

Fix bug that made changes to a special remote sometimes be missed when
importing a tree from it. The diff import would miss when a change was
exported, then manually undone on the special remote (eg deleting a newly
exported file). A full import is needed to catch such changes.

After upgrading, any such missed changes will be included in the next
tree imported from a special remote. This happens because the previously
recorded content identifier tree does not have export information included,
so it is treated as invalid, and a full import is done.

Fixes reversion introduced in version 10.20230626, commit
40017089f268391f79226592850b58855cdbf808

Unfortunately, this does mean that after each export, the next import will
be a full import. Which can take significantly longer than the diff import
does, when there are a lot of files in the tree.

It would be better if exporting also update the content identifier tree.
However, I don't know if that can be done inexpensively. It would be future
optimisation work, in any case.

(That could only be done for an export that is run in the same
repository as the import. When an export is run in a different repository,
the export.log gets updated, and that propagates to the repository where
import is later run. At that point, a full import is done.)

Sponsored-by: Luke T. Shumaker
Annex/Import.hs
CHANGELOG
Command/Import.hs
Command/Sync.hs
Logs/Import.hs
doc/bugs/annex_import_doesn__39__t_delete_files_during_updates.mdwn